<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>

        // ! 是逻辑运算    逻辑运算的结果一定是布尔值   true / false

        var a = true;
        var b = !a;
        console.log(b);   // false



        var x = 2;
        var y = !x;
        // !2  2会转布尔值true   !true  ->  false
        console.log(y);   // false



        var m = 3;
        // if(条件语句)   条件语句必定是布尔值  true / false
        if (m) {
            alert('我会执行');
        }
    </script>

</body>

</html>